<div class="clear"></div>
<div id="formSuscribete">
<div class="menu-int">
    <p class="menu-int-li borderCornersTop backgroundWhite">Suscribete</p>
    <div class="menu-int-content borderCornersBottom">
<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>        
        
<form id="myFormSuscribete" class="inputRegistro" action="<?php echo url_for('registroMail/'.($form->getObject()->isNew() ? 'create' : 'create').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
<p>
Si desea recibir información sobre
nuestras promociones y servicios,
ingrese su correo aquí:
</p>
      <?php echo $form->renderGlobalErrors() ?>
       <?php echo $form['email'] ?>
       <?php echo $form['email']->renderError() ?>
        <?php echo $form->renderHiddenFields(false) ?>

          <div class="clear"></div>
          <?php if ($sf_user->hasFlash('notice')): ?>
              <div class="notice"><?php echo $sf_user->getFlash('notice') ?></div>
            <?php endif; ?>

            <?php if ($sf_user->hasFlash('error')): ?>
              <div class="error"><?php echo $sf_user->getFlash('error') ?></div>
            <?php endif; ?>
          <div class="clear"></div>
          <input type="submit" value="Guardar" id="bottonRegistro"/>
                  
              
          </form>
<div class="clear"></div>

    </div>
    
    
    
</div>
</div>
            
<!--Ejecucion del Formulario por Jquery para evitar recarga-->
<script type="text/javascript">
    <?php
    //Impresion de Funcion para la recarga de la pagina cuando se ingrese un nuevo registro
    if (!$form->getObject()->isNew())
    echo "\tLoadUser('".url_for('dashboard/cliente')."','".$idUser."');"; ?>
// prepare the form when the DOM is ready
$(document).ready(function() {
    var options = {
        target:        '#formSuscribete',   // target element(s) to be updated with server response
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       showResponse  // post-submit callback
    };

    // bind form using 'ajaxForm'
    $('#myFormSuscribete').ajaxForm(options);
});

// pre-submit callback
function showRequest(formData, jqForm, options) {
    var queryString = $.param(formData);
    return true;
}

// post-submit callback
function showResponse(responseText, statusText, xhr, $form)  {

}
</script>


